Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(geo-features): searching via name should include project-id #572

Merged
merged 3 commits into from
Oct 14, 2021

Conversation

kgajowy
Copy link
Contributor

@kgajowy kgajowy commented Oct 13, 2021

PR is hard to read in one diff - recommended way it commit-by-commit.

First one contains a little re-organization of "AppInfoDTO" thingy to keep known properties really known - during that it proved that some property is "used" but not really created/added at any point, thus leading to not using project id correctly
Second is another fix - previously the OR like ... was out of the other conditions, totally ignoring project limitations. Thanks @Sikora00 for spotting this!

With search param:
image

@vercel
Copy link

vercel bot commented Oct 13, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/7vmNyzff4we5d11tfPvJeKd7bKbP
✅ Preview: https://marxan-git-fix-marxan-859-search-feature-query-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/CYjReEzZq4S3UPDupeuvqq5NqGT2
✅ Preview: https://marxan-storybook-git-fix-marxan-859-search-f-7dd58d-vizzuality1.vercel.app

@kgajowy
Copy link
Contributor Author

kgajowy commented Oct 13, 2021

Need to rewrite specs.

Copy link
Member

@hotzevzl hotzevzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it took me a while to realise that getFeaturePropertySetsForFeatures() takes lists of features already filtered by projectId (or not bound to a project), after which my panic for having only a filter by bbox (as it was already) rather than this being a narrowing of an existing set subsided 😅

as for the removed test, I am not visualizing in my mind why this started failing now (I suppose that the filter by bbox was not working correctly in the tested project), but I'd say we should keep a test for this - if not with "real" data (as in, what we seed dbs with in test environments) at least with a minimal mock repository - what do you think?

@kgajowy
Copy link
Contributor Author

kgajowy commented Oct 13, 2021

as for the removed test, I am not visualizing in my mind why this started failing now (I suppose that the filter by bbox was not working correctly in the tested project), but I'd say we should keep a test for this - if not with "real" data (as in, what we seed dbs with in test environments) at least with a minimal mock repository - what do you think?

@hotzevzl test restored. Lower amount of results may be happening due to incorrectly applied like before (OR outside the rest of WHEREs - so it was grabbing not-intended features)

@kgajowy kgajowy merged commit 5536150 into develop Oct 14, 2021
@kgajowy kgajowy deleted the fix/MARXAN-859-search-feature-query branch October 14, 2021 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants